"use client"; import { useTranslations } from "next-intl"; import { FC, PropsWithChildren, useRef, useState } from "react"; import "./page.scss"; interface Props {} const App: FC> = (props) => { const t = useTranslations("FaqPage"); const sliderRef = useRef(null); const [num, setNum] = useState(100); const [money, setMoney] = useState("5000"); const handleSlide: any = (e: React.MouseEvent) => { if (sliderRef.current) { const startX = sliderRef.current.getBoundingClientRect().x; const x = e.clientX - startX; const xRem = x / (144 * 0.6); const intNum = Math.round(10000 * xRem) - Math.round((10000 * xRem) % 10); setNum(intNum); const m = intNum * 50; let r = ""; const arr = m.toString().split(""); arr.forEach((item, i) => { if (i !== arr.length - 1 && (arr.length - i - 1) % 3 === 0) { r += item + ","; } else { r += item; } }); setMoney(r); const scale = (Math.round(xRem * 10000) / 100.0).toFixed(2) + "%"; sliderRef.current.style.width = scale; } }; return (

{t("title1")}

{t("content1")}

{t("title2")}

{t("content2")}

{t("title3")}

{t("content3")}

{t("title4")}

{t("content4")}
{t("number")} > {num}
{t("Comissão")} > {t("R$")} {money} {t("money")}
{t("title5")}
  • {t("content5-1")} {t("red1")}
  • {t("content5-2")}

{t("title6")}

{t("content6-1")}

{t("content6-2")}

{t("content6-3")}

); }; export default App;